<template>
	<div>
		<div>
			<a style="margin-left: -1080px;color: blue;" href="/backlog.vue">待办列表</a>&nbsp;&nbsp;&nbsp;
			<a style="color: black" href="#">个人资料修改</a>

			<template>
				<el-table :data="tableData">
					<el-table-column fixed prop="bugtypename" label="待办任务类型" width="200px">
					</el-table-column>
					<el-table-column prop="bugdesc" label="待办任务名称" width="250px">
					</el-table-column>
					<el-table-column prop="inspecttime" label="到达时间" width="230px">
					</el-table-column>
					<el-table-column label="操作" width="220px" > 
						<template slot-scope="scope">
							<el-button size="small" type="text" @click="handleEdit(scope.$index, scope.row)">查看</el-button>
							<el-button size="small" type="text" @click="handleDelete(scope.$index, scope.row)">处理</el-button>
					    </template>
					</el-table-column>
				</el-table>
			</template>

		</div>
		<div >
			
			<el-dialog :visible.sync="dialogTableVisible">
				<el-form ref="tableDatas" :model="tableDatas" label-width="150px">
					<el-form-item label="任务编号:" prop="tableDatasinspectiontaskcode" :label-width="formLabelWidth">
						<el-input v-model="tableDatas.tableDatasinspectiontaskcode"></el-input>
					</el-form-item>
					<el-form-item label="任务名称:" prop="inspectiontaskname" :label-width="formLabelWidth">
						<el-input v-model="tableDatas.inspectiontaskname"></el-input>
					</el-form-item>
					<el-form-item label="巡检线路:" prop="linename" :label-width="formLabelWidth">
						<el-input v-model="tableDatas.linename"></el-input>
					</el-form-item>
					<el-form-item label="起始杆号:" prop="startpolecode" :label-width="formLabelWidth">
						<el-input v-model="tableDatas.startpolecode"></el-input>
					</el-form-item>
					<el-form-item label="终止杆号" prop="endpolecode" :label-width="formLabelWidth">
						<el-input v-model="tableDatas.endpolecode" ></el-input>
					</el-form-item>
					<el-form-item label="下发人" prop="issuedbyname" :label-width="formLabelWidth">
						<el-input v-model="tableDatas.issuedbyname"></el-input>
					</el-form-item>
					<el-form-item label="下发时间" prop="issuedtime" :label-width="formLabelWidth">
						<el-input v-model="tableDatas.issuedtime"></el-input>
					</el-form-item>
					<el-form-item label="备注信息" prop="issuedtime" :label-width="formLabelWidth">
						<el-input v-model="tableDatas.issuedtime"></el-input>
					</el-form-item>
				</el-form>
				<div slot="footer" class="dialog-footer">
					<el-button @click="dialogTableVisible = false">取 消</el-button>
					<el-button type="primary" @click="dialogTableVisible = false">确 定</el-button>
				</div>
			</el-dialog>
		</div>
	</div>
</template>

<script>
	export default {
		data() {
			return {
				tableData: [],
				tableDatas:[{}],
				dialogTableVisible: false,
				formLabelWidth: '120px'
			}
		},
		methods: {
			handleEdit(index,row) {
				 let that=this;
				 this.axios.get("http://localhost:8080/prinSelect", {
				  	params: {
				  		id:row.id
				  	}	
				  }).then(function(res) {
					  that.tableDatas=res.data;
					  that.dialogTableVisible = true;
				  }).catch(err => {
				  	console.log(err)
				  })
				   
			},
			shujujiazai: function() {
				let that=this;
				this.axios.post("http://localhost:8080/psInspectiontask", {

				}).then(function(res) {
					that.tableData = res.data;
				}).catch(err => {
					console.log(err)
				})
			}

		},
		mounted() {
			this.shujujiazai();
		}

	}
</script>

<style>

</style>